module.exports = app => {
    const seq = app.Sequelize;

    const Form = app.model.define('form', {
        id:{
            type:seq.INTEGER,
            autoIncrement:true,
            allowNull:false,
            primaryKey:true,
            unique:true
        },
        name:{
            type:seq.STRING,
            allowNull:false
        },
        attr:{
            type:seq.TEXT,
            allowNull:false
        }
    },{
        timestamps:true,
        paranoid:true,
        underscored:false
    });

    Form.associate=function () {
        app.model.Form.hasMany(app.model.Formmsg);
    };


    return Form;
};